% setup block parameters
function [model, layer, fields] = setupParameters(dt,nt,nlyr,nx,ny,dx,dy,damp,rho,vp,vs,lyr_no)
model.nx = nx;
model.ny = ny;
model.dx = dx;
model.dy = dy;
model.dt = dt;
model.nt = nt;
model.damp = damp;

layer.rho = rho;
layer.vp  = vp;
layer.vs  = vs;
layer.mu  = rho * vs^2;
layer.lambda = rho * vp^2 - 2 * layer.mu;
layer.Zp  = rho * vp;
layer.Zs  = rho * vs;
layer.number = lyr_no;
layer.total_lyr = nlyr;

fields.vx  = zeros(model.nx,model.ny);
fields.vy  = zeros(model.nx,model.ny);
fields.sxx = zeros(model.nx,model.ny);
fields.sxy = zeros(model.nx,model.ny);
fields.syy = zeros(model.nx,model.ny);
end